package com.isunland.managesystem.adapter;

import android.content.Context;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BaseListAdapter;
import com.isunland.managesystem.entity.CompanyEventsChild;
import java.util.List;

/**
 * 对象功能:
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: HuXiaoDan
 * 创建时间: 2017/4/18 13:57
 */
public class CompanyEventsChildListAdapter extends BaseListAdapter<CompanyEventsChild> {
  public CompanyEventsChildListAdapter(Context context, List<CompanyEventsChild> objects) {
    super(context, objects);
  }

  @Override public void bindData(int position, ViewHolder vh, CompanyEventsChild item) {
    vh.mTitleOneTv.setText(R.string.propertyName);

    vh.mTitleTwoTv.setText(R.string.attributeCategory);
    vh.mTitleThreeTv.setText(R.string.propertyValue);
    vh.mContentOneTv.setText(item.getSdefpropName());
    if ("01".equalsIgnoreCase(item.getSdefpropEditKind())) {
      vh.mContentTwoTv.setText(R.string.words);
    } else if ("02".equalsIgnoreCase(item.getSdefpropEditKind())) {
      vh.mContentTwoTv.setText(R.string.data);
    } else if ("03".equalsIgnoreCase(item.getSdefpropEditKind())) {
      vh.mContentTwoTv.setText(R.string.fileOriginalName);
    }

    vh.mContentThreeTv.setText(item.getSdefpropValue());
  }
}
